#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

void reverse(char* str)
{
	int len = strlen(str);
	int right = len - 1;
	int left = 0;
	while (left < right)
	{
		int tmp = 0;
		tmp = *(str + left);
		*(str + left) = *(str + right);
		*(str + right) = tmp;
		left++;
		right--;
	}
}
int main()
{
	char arr[] = "abcdefg";
	printf("%s\n", arr);
	reverse(arr);
	printf("%s\n", arr);
	return 0;
}